﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SockLib.Device.ModbusDevices
{
     interface MBType
    {

        /// <summary>
        /// 收到的数据分析，并且返回解析好的数据
        /// </summary>
        /// <param name="buffer">收到的数据</param>
        /// <param name="res">数据正确的话返回解析后的字符串</param>
        /// <returns></returns>
        bool  DataAnaly(byte[] buffer, ref  ModbusData  res);

        /// <summary>
        /// 获得Modbus设备的名称
        /// </summary>
        /// <returns></returns>
        string GetDeviceType();

        /// <summary>
        /// 获得modbus设备的ID
        /// </summary>
        /// <returns></returns>
        int GetDeviceId();

    }
}
